package com.wangyonghui.attendanceserver.controller;


import com.wangyonghui.attendanceserver.entity.Dept;
import com.wangyonghui.attendanceserver.service.IDeptService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wangyonghui
 * @since 2020-03-29
 */
@RestController
@RequestMapping("/dept")
public class DeptController {

    @Resource
    private IDeptService deptService;

    @RequestMapping("depts")
    public List<Dept> list(){
        return deptService.list();
    }
}
